package com.sharkburner.common.util;

import com.vaadin.data.Validator.InvalidValueException;
import com.vaadin.data.validator.EmailValidator;

/**
 * Application Utils, contains: Patterns, File formats and other methods util
 * 
 * @author piu
 * 
 */
public class AppUtil {

    /**
     * If string is valid email
     * 
     * @param email
     * @return
     */
    public static boolean isValidEmail(String email) {
        try {
            EmailValidator validator = new EmailValidator("");
            validator.validate(email);
            return true;
        } catch (InvalidValueException e) {
            return false;
        }
    }
}
